<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * Description of cmd_model
 * 
 * @author Subha Sundar Das (subhasundar.das@gmail.com)
 */
class Cms_model extends CI_Model {

    //put your code here

    function get_cmses(){
        $sql = "Select * from cms where status=51";
        $query=$this->db->query($sql);
        $result=$query->result();
        return $result;
        
    }
    
    function get_cms($id=0){
        $sql = "Select * from cms where status=51 and id=$id";
        $query=$this->db->query($sql);
        return $query->row();  
    }
    

}

?>
